'use strict';

module.exports = app => {
  const { STRING, INTEGER, DATE } = app.Sequelize;

  const game_score = app.model.define('game_score', {
    id: { type: INTEGER, primaryKey: true, autoIncrement: true },
    openId:{
      type:STRING,
      field:"open_id"
    },
    nickName:{
      type:STRING,
      field:"nick_name"
    },
    avatarUrl:{
      type:STRING(300),
      field:"avatar_url"
    },
    moduleId:{
      type:INTEGER,
      field:"module_id"
    },
    score:INTEGER
  },{
    timestamps:false,
    paranoid:true,
    freezeTableName:true
  });

  return game_score;
};